# http://www.mediawiki.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# http://www.gnu.org/copyleft/gpl.html
header( "Content-type: text/html; charset=utf-8" );
?>
MediaWiki installation
MediaWiki is
Copyright (C) 2001-2004 by Magnus Manske, Brion Vibber, Lee Daniel Crocker,
Tim Starling, Erik Möller, and others.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This progarm is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
or read it online
Please move LocalSettings.php to the parent directory, then
try out your wiki.
(You should remove this config directory for added security once you're done.)
" );
}
if( !is_writable( "." ) ) {
dieout( "
Can't write config file, aborting
In order to configure the wiki you have to make the config subdirectory
writable by the web server. Once configuration is done you'll move the created
LocalSettings.php to the parent directory, and for added safety you can
then remove the config subdirectory entirely.
To make the directory writable on a Unix/Linux system:
cd /path/to/wiki
chmod a+w config
" );
}
include( "../install-utils.inc" );
class ConfigData {
function getEncoded( $data ) {
# Hackish
global $wgInputEncoding;
if( strcasecmp( $wgInputEncoding, "utf-8" ) == 0 ) {
return $data;
} else {
return utf8_decode( $data ); /* to latin1 wikis */
}
}
function getSitename() { return $this->getEncoded( $this->Sitename ); }
function getSysopName() { return $this->getEncoded( $this->SysopName ); }
function getSysopPass() { return $this->getEncoded( $this->SysopPass ); }
}
?>
\n";
if( $conf->Root ) {
# Grant user permissions
dbsource( "../maintenance/users.sql", $wgDatabase );
}
}
/* Write out the config file now that all is well */
print "
Creating LocalSettings.php...
\n\n";
$f = fopen( "LocalSettings.php", "xt" );
if( $f == false ) {
dieout( "Couldn't write out LocalSettings.php. Check that the directory permissions are correct and that there isn't already a fiel of that name here." );
}
fwrite( $f, "<" . "?php\n$local\n?" . ">" );
fclose( $f );
print "
Success! Move the LocalSettings.php file into the parent directory, then follow
this link to your wiki.
\n";
} while( false );
}
?>
posted ) {
echo "
Something's not quite right yet; make sure everything below is filled out correctly.